//
//  Simulation.h
//  Texture
//
//  Created by Yao Melo on 12/29/12.
//
//

#ifndef __Texture__Simulation__
#define __Texture__Simulation__

#include <iostream>
#include <vector.h>
#include "SimulationConstants.h"
#include "SimInvader.h"
#include "SimShip.h"
#include "SimShot.h"
#include "SimExplosion.h"



typedef enum  {
    eStateGameover = 1,
    eStateWin = 2,
    eStatePlaying = 3
} SimGameState;

using namespace std;

class Simulation
{
protected:
    void UpdateInvaders(float delta);
    void UpdateShots(float delta);
    void UpdateExplosions(float delta);
    void CheckInvaderCollision();
    void CheckShipCollision();
    void CheckGameState();
public:
    vector<SimInvader> *invaders;
    vector<SimExplosion> *explosions;
    vector<SimShot> *shots;
    SimShip *ship;
    unsigned int score;
    float speedMultiplier;
    int shipShotIndex;
    SimGameState  gameState;
    Simulation();
    ~Simulation();
    void Update(float inteval);
    void MoveLeft(float delta);
    void MoveRight(float delta);
    void Shot();
//    GLint  GetSimObjectCount();
//    SimObj * GetSimObject(GLint index);
};


#endif /* defined(__Texture__Simulation__) */
